import rental.RegularClassification;
import junit.framework.TestCase;


public class TestRegularClassification extends TestCase {

	RegularClassification regularMovie;
	
	protected void setUp() throws Exception {
		regularMovie = new RegularClassification();
	}
	
	public void testGetPriceCode() {
		assertEquals(0, regularMovie.getPriceCode());
		RegularClassification regular2 = new RegularClassification();
		assertEquals(0, regular2.getPriceCode());
	}
	
	public void testGetRentValue1(){
		assertEquals(2.0, regularMovie.getRentValue(1));
		assertEquals(2.0, regularMovie.getRentValue(2));
	}
	
	public void testGetRentValue2(){
		assertEquals(3.5, regularMovie.getRentValue(3));
		assertEquals(5.0, regularMovie.getRentValue(4));
		assertEquals(6.5, regularMovie.getRentValue(5));
		assertEquals(14.0, regularMovie.getRentValue(10));
		assertEquals(149.0, regularMovie.getRentValue(100));
		assertEquals(1499.0, regularMovie.getRentValue(1000));
	}

	public void testGetMsg() {
		assertEquals("Please check the classification in the back cover.", regularMovie.getMsg());
	}

	public void testGetProgramPoints(){
		assertEquals(1, regularMovie.getProgramPoints(1));
		RegularClassification regular2 = new RegularClassification();
		assertEquals(1, regular2.getProgramPoints(1));
		assertEquals(1, regular2.getProgramPoints(5));
		assertEquals(1, regular2.getProgramPoints(10));
		assertEquals(1, regular2.getProgramPoints(100));
		assertEquals(1, regular2.getProgramPoints(1000));
	}

}
